package hu.bme.mit.androtext.gui.serializer;

import com.google.inject.Inject;
import com.google.inject.Provider;
import hu.bme.mit.androtext.gui.androGui.AbsoluteLayout;
import hu.bme.mit.androtext.gui.androGui.AndroGuiPackage;
import hu.bme.mit.androtext.gui.androGui.AndroGuiRoot;
import hu.bme.mit.androtext.gui.androGui.BooleanLiteral;
import hu.bme.mit.androtext.gui.androGui.Button;
import hu.bme.mit.androtext.gui.androGui.CheckBox;
import hu.bme.mit.androtext.gui.androGui.CheckBoxPreference;
import hu.bme.mit.androtext.gui.androGui.EditText;
import hu.bme.mit.androtext.gui.androGui.EditTextPreference;
import hu.bme.mit.androtext.gui.androGui.Entry;
import hu.bme.mit.androtext.gui.androGui.FrameLayout;
import hu.bme.mit.androtext.gui.androGui.LinearLayout;
import hu.bme.mit.androtext.gui.androGui.ListPreference;
import hu.bme.mit.androtext.gui.androGui.ListView;
import hu.bme.mit.androtext.gui.androGui.Preference;
import hu.bme.mit.androtext.gui.androGui.PreferenceCategory;
import hu.bme.mit.androtext.gui.androGui.PreferenceDefaultValueAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceDialogTitleAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceEnabledAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceEntriesAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceEntryValuesAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceKeyAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferencePersistentAttribute;
import hu.bme.mit.androtext.gui.androGui.PreferenceScreen;
import hu.bme.mit.androtext.gui.androGui.PreferenceSummaryAttribute;
import hu.bme.mit.androtext.gui.androGui.RadioButton;
import hu.bme.mit.androtext.gui.androGui.RadioGroup;
import hu.bme.mit.androtext.gui.androGui.RatingBar;
import hu.bme.mit.androtext.gui.androGui.RelativeLayout;
import hu.bme.mit.androtext.gui.androGui.RingtonePrefence;
import hu.bme.mit.androtext.gui.androGui.Spinner;
import hu.bme.mit.androtext.gui.androGui.StringEntry;
import hu.bme.mit.androtext.gui.androGui.TextView;
import hu.bme.mit.androtext.gui.androGui.ToggleButton;
import hu.bme.mit.androtext.gui.services.AndroGuiGrammarAccess;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;

@SuppressWarnings("restriction")
public class AbstractAndroGuiSemanticSequencer extends AbstractSemanticSequencer {

	@Inject
	protected AndroGuiGrammarAccess grammarAccess;
	
	@Inject
	protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
	
	@Inject
	protected ITransientValueService transientValues;
	
	@Inject
	@GenericSequencer
	protected Provider<ISemanticSequencer> genericSequencerProvider;
	
	protected ISemanticSequencer genericSequencer;
	
	
	@Override
	public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
		super.init(sequencer, sequenceAcceptor, errorAcceptor);
		this.genericSequencer = genericSequencerProvider.get();
		this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
	}
	
	public void createSequence(EObject context, EObject semanticObject) {
		if(semanticObject.eClass().getEPackage() == AndroGuiPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
			case AndroGuiPackage.ABSOLUTE_LAYOUT:
				if(context == grammarAccess.getAbsoluteLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_AbsoluteLayout(context, (AbsoluteLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.ANDRO_GUI_ROOT:
				if(context == grammarAccess.getAndroGuiRootRule()) {
					sequence_AndroGuiRoot(context, (AndroGuiRoot) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.BOOLEAN_LITERAL:
				if(context == grammarAccess.getBooleanLiteralRule()) {
					sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.BUTTON:
				if(context == grammarAccess.getButtonRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Button(context, (Button) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.CHECK_BOX:
				if(context == grammarAccess.getCheckBoxRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_CheckBox(context, (CheckBox) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.CHECK_BOX_PREFERENCE:
				if(context == grammarAccess.getCheckBoxPreferenceRule() ||
				   context == grammarAccess.getPreferenceRule()) {
					sequence_CheckBoxPreference(context, (CheckBoxPreference) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.EDIT_TEXT:
				if(context == grammarAccess.getEditTextRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_EditText(context, (EditText) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.EDIT_TEXT_PREFERENCE:
				if(context == grammarAccess.getEditTextPreferenceRule() ||
				   context == grammarAccess.getPreferenceRule()) {
					sequence_EditTextPreference(context, (EditTextPreference) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.ENTRY:
				if(context == grammarAccess.getEntryRule()) {
					sequence_Entry(context, (Entry) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.FRAME_LAYOUT:
				if(context == grammarAccess.getFrameLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_FrameLayout(context, (FrameLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.LINEAR_LAYOUT:
				if(context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getLinearLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_LinearLayout(context, (LinearLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.LIST_PREFERENCE:
				if(context == grammarAccess.getListPreferenceRule() ||
				   context == grammarAccess.getPreferenceRule()) {
					sequence_ListPreference(context, (ListPreference) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.LIST_VIEW:
				if(context == grammarAccess.getListViewRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_ListView(context, (ListView) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE:
				if(context == grammarAccess.getPreferenceRule()) {
					sequence_Preference(context, (Preference) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_CATEGORY:
				if(context == grammarAccess.getPreferenceRule() ||
				   context == grammarAccess.getPreferenceCategoryRule()) {
					sequence_PreferenceCategory(context, (PreferenceCategory) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_DEFAULT_VALUE_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceDefaultValueAttributeRule()) {
					sequence_PreferenceDefaultValueAttribute(context, (PreferenceDefaultValueAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_DIALOG_TITLE_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceDialogTitleAttributeRule()) {
					sequence_PreferenceDialogTitleAttribute(context, (PreferenceDialogTitleAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_ENABLED_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceEnabledAttributeRule()) {
					sequence_PreferenceEnabledAttribute(context, (PreferenceEnabledAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_ENTRIES_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceEntriesAttributeRule()) {
					sequence_PreferenceEntriesAttribute(context, (PreferenceEntriesAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_ENTRY_VALUES_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceEntryValuesAttributeRule()) {
					sequence_PreferenceEntryValuesAttribute(context, (PreferenceEntryValuesAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_KEY_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceKeyAttributeRule()) {
					sequence_PreferenceKeyAttribute(context, (PreferenceKeyAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_PERSISTENT_ATTRIBUTE:
				if(context == grammarAccess.getPreferencePersistentAttributeRule()) {
					sequence_PreferencePersistentAttribute(context, (PreferencePersistentAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_SCREEN:
				if(context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getPreferenceRule() ||
				   context == grammarAccess.getPreferenceScreenRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_PreferenceScreen(context, (PreferenceScreen) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.PREFERENCE_SUMMARY_ATTRIBUTE:
				if(context == grammarAccess.getPreferenceSummaryAttributeRule()) {
					sequence_PreferenceSummaryAttribute(context, (PreferenceSummaryAttribute) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.RADIO_BUTTON:
				if(context == grammarAccess.getRadioButtonRule()) {
					sequence_RadioButton(context, (RadioButton) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.RADIO_GROUP:
				if(context == grammarAccess.getRadioGroupRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_RadioGroup(context, (RadioGroup) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.RATING_BAR:
				if(context == grammarAccess.getRatingBarRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_RatingBar(context, (RatingBar) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.RELATIVE_LAYOUT:
				if(context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRelativeLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_RelativeLayout(context, (RelativeLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.RINGTONE_PREFENCE:
				if(context == grammarAccess.getPreferenceRule() ||
				   context == grammarAccess.getRingtonePrefenceRule()) {
					sequence_RingtonePrefence(context, (RingtonePrefence) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.SPINNER:
				if(context == grammarAccess.getSpinnerRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Spinner(context, (Spinner) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.STRING_ENTRY:
				if(context == grammarAccess.getStringEntryRule()) {
					sequence_StringEntry(context, (StringEntry) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.TEXT_VIEW:
				if(context == grammarAccess.getTextViewRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_TextView(context, (TextView) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiPackage.TOGGLE_BUTTON:
				if(context == grammarAccess.getToggleButtonRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_ToggleButton(context, (ToggleButton) semanticObject); 
					return; 
				}
				else break;
			}
		if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}
	
	/**
	 * Constraint:
	 *     (id=ID? layoutStyle=LayoutStyle elements+=UIElement*)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    elements[0, *]
	 */
	protected void sequence_AbsoluteLayout(EObject context, AbsoluteLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID rootlayout=RootLayout entries+=StringEntry*)
	 *
	 * Features:
	 *    name[1, 1]
	 *    rootlayout[1, 1]
	 *    entries[0, *]
	 */
	protected void sequence_AndroGuiRoot(EObject context, AndroGuiRoot semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (isTrue?='true'?)
	 *
	 * Features:
	 *    isTrue[0, 1]
	 */
	protected void sequence_BooleanLiteral(EObject context, BooleanLiteral semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? text=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    text[1, 1]
	 */
	protected void sequence_Button(EObject context, Button semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute?
	 *     )
	 *
	 * Features:
	 *    title[1, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 */
	protected void sequence_CheckBoxPreference(EObject context, CheckBoxPreference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? text=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    text[1, 1]
	 */
	protected void sequence_CheckBox(EObject context, CheckBox semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute? 
	 *         dialogTitle=PreferenceDialogTitleAttribute? 
	 *         defaultValue=PreferenceDefaultValueAttribute?
	 *     )
	 *
	 * Features:
	 *    title[1, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 *    dialogTitle[0, 1]
	 *    defaultValue[0, 1]
	 */
	protected void sequence_EditTextPreference(EObject context, EditTextPreference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? text=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    text[1, 1]
	 */
	protected void sequence_EditText(EObject context, EditText semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=STRING? value=STRING)
	 *
	 * Features:
	 *    name[0, 1]
	 *    value[1, 1]
	 */
	protected void sequence_Entry(EObject context, Entry semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? layoutStyle=LayoutStyle elements+=UIElement*)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    elements[0, *]
	 */
	protected void sequence_FrameLayout(EObject context, FrameLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? orientation?='horizontal'? layoutStyle=LayoutStyle elements+=UIElement*)
	 *
	 * Features:
	 *    id[0, 1]
	 *    orientation[0, 1]
	 *    layoutStyle[1, 1]
	 *    elements[0, *]
	 */
	protected void sequence_LinearLayout(EObject context, LinearLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute? 
	 *         dialogTitle=PreferenceDialogTitleAttribute? 
	 *         defaultValue=PreferenceDefaultValueAttribute? 
	 *         entries=PreferenceEntriesAttribute? 
	 *         entryValues=PreferenceEntryValuesAttribute?
	 *     )
	 *
	 * Features:
	 *    title[1, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 *    dialogTitle[0, 1]
	 *    defaultValue[0, 1]
	 *    entries[0, 1]
	 *    entryValues[0, 1]
	 */
	protected void sequence_ListPreference(EObject context, ListPreference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID layoutStyle=LayoutStyle entries=[StringEntry|ID]? layout=[AndroGuiRoot|ID]?)
	 *
	 * Features:
	 *    id[1, 1]
	 *    layoutStyle[1, 1]
	 *    entries[0, 1]
	 *    layout[0, 1]
	 */
	protected void sequence_ListView(EObject context, ListView semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (title=STRING preferences+=Preference*)
	 *
	 * Features:
	 *    title[1, 1]
	 *    preferences[0, *]
	 */
	protected void sequence_PreferenceCategory(EObject context, PreferenceCategory semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     value=STRING
	 *
	 * Features:
	 *    value[1, 1]
	 */
	protected void sequence_PreferenceDefaultValueAttribute(EObject context, PreferenceDefaultValueAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_DEFAULT_VALUE_ATTRIBUTE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_DEFAULT_VALUE_ATTRIBUTE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceDefaultValueAttributeAccess().getValueSTRINGTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=STRING
	 *
	 * Features:
	 *    value[1, 1]
	 */
	protected void sequence_PreferenceDialogTitleAttribute(EObject context, PreferenceDialogTitleAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_DIALOG_TITLE_ATTRIBUTE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_DIALOG_TITLE_ATTRIBUTE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceDialogTitleAttributeAccess().getValueSTRINGTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     enabled=BooleanLiteral
	 *
	 * Features:
	 *    enabled[1, 1]
	 */
	protected void sequence_PreferenceEnabledAttribute(EObject context, PreferenceEnabledAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENABLED_ATTRIBUTE__ENABLED) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENABLED_ATTRIBUTE__ENABLED));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceEnabledAttributeAccess().getEnabledBooleanLiteralParserRuleCall_1_0(), semanticObject.getEnabled());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     entries=[StringEntry|ID]
	 *
	 * Features:
	 *    entries[1, 1]
	 */
	protected void sequence_PreferenceEntriesAttribute(EObject context, PreferenceEntriesAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENTRIES_ATTRIBUTE__ENTRIES) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENTRIES_ATTRIBUTE__ENTRIES));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceEntriesAttributeAccess().getEntriesStringEntryIDTerminalRuleCall_1_0_1(), semanticObject.getEntries());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     entryValues=[StringEntry|ID]
	 *
	 * Features:
	 *    entryValues[1, 1]
	 */
	protected void sequence_PreferenceEntryValuesAttribute(EObject context, PreferenceEntryValuesAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENTRY_VALUES_ATTRIBUTE__ENTRY_VALUES) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_ENTRY_VALUES_ATTRIBUTE__ENTRY_VALUES));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceEntryValuesAttributeAccess().getEntryValuesStringEntryIDTerminalRuleCall_1_0_1(), semanticObject.getEntryValues());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=ID
	 *
	 * Features:
	 *    value[1, 1]
	 */
	protected void sequence_PreferenceKeyAttribute(EObject context, PreferenceKeyAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_KEY_ATTRIBUTE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_KEY_ATTRIBUTE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceKeyAttributeAccess().getValueIDTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     persistent=BooleanLiteral
	 *
	 * Features:
	 *    persistent[1, 1]
	 */
	protected void sequence_PreferencePersistentAttribute(EObject context, PreferencePersistentAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_PERSISTENT_ATTRIBUTE__PERSISTENT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_PERSISTENT_ATTRIBUTE__PERSISTENT));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferencePersistentAttributeAccess().getPersistentBooleanLiteralParserRuleCall_1_0(), semanticObject.getPersistent());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING? 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute? 
	 *         preferences+=Preference*
	 *     )
	 *
	 * Features:
	 *    title[0, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 *    preferences[0, *]
	 */
	protected void sequence_PreferenceScreen(EObject context, PreferenceScreen semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     value=STRING
	 *
	 * Features:
	 *    value[1, 1]
	 */
	protected void sequence_PreferenceSummaryAttribute(EObject context, PreferenceSummaryAttribute semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiPackage.Literals.PREFERENCE_SUMMARY_ATTRIBUTE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiPackage.Literals.PREFERENCE_SUMMARY_ATTRIBUTE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceSummaryAttributeAccess().getValueSTRINGTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute?
	 *     )
	 *
	 * Features:
	 *    title[1, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 */
	protected void sequence_Preference(EObject context, Preference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? text=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    text[1, 1]
	 *    layoutStyle[1, 1]
	 */
	protected void sequence_RadioButton(EObject context, RadioButton semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? orientation?='horizontal'? layoutStyle=LayoutStyle radiobuttons+=RadioButton+)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    orientation[0, 1]
	 *    radiobuttons[1, *]
	 */
	protected void sequence_RadioGroup(EObject context, RadioGroup semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? numStars=INT layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    numStars[1, 1]
	 */
	protected void sequence_RatingBar(EObject context, RatingBar semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? layoutStyle=LayoutStyle elements+=UIElement*)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    elements[0, *]
	 */
	protected void sequence_RelativeLayout(EObject context, RelativeLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         title=STRING 
	 *         key=PreferenceKeyAttribute? 
	 *         summary=PreferenceSummaryAttribute? 
	 *         enabled=PreferenceEnabledAttribute? 
	 *         persistent=PreferencePersistentAttribute?
	 *     )
	 *
	 * Features:
	 *    title[1, 1]
	 *    key[0, 1]
	 *    summary[0, 1]
	 *    enabled[0, 1]
	 *    persistent[0, 1]
	 */
	protected void sequence_RingtonePrefence(EObject context, RingtonePrefence semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? entries=[StringEntry|ID] layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    entries[1, 1]
	 */
	protected void sequence_Spinner(EObject context, Spinner semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID entry+=Entry+)
	 *
	 * Features:
	 *    name[1, 1]
	 *    entry[1, *]
	 */
	protected void sequence_StringEntry(EObject context, StringEntry semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? text=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    text[1, 1]
	 */
	protected void sequence_TextView(EObject context, TextView semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (id=ID? textOn=STRING textOff=STRING layoutStyle=LayoutStyle)
	 *
	 * Features:
	 *    id[0, 1]
	 *    layoutStyle[1, 1]
	 *    textOn[1, 1]
	 *    textOff[1, 1]
	 */
	protected void sequence_ToggleButton(EObject context, ToggleButton semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
}
